package com.biannuo.szk.demo.consumer.service.impl;

import com.biannuo.szk.common.bean.ComplexObject;
import com.biannuo.szk.common.bean.Params;
import com.biannuo.szk.common.bean.Result;
import com.biannuo.szk.demo.consumer.service.DemoConsumerService;
import com.biannuo.szk.demo.provider.feign.DemoProviderClient;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author szk
 */
@Service
@Slf4j
@RequiredArgsConstructor
public class DemoConsumerServiceImpl implements DemoConsumerService {
    @Resource
    private DemoProviderClient demoProviderClient;

    @Override
    public String openFeignProviderTest() {
        return demoProviderClient.openFeignProviderTest();
    }

    @Override
    public String sampleParamsProviderTest(String name, Integer id) {
        return demoProviderClient.sampleParamsProviderTest(name, id);

    }

    @Override
    public String springQueryMapProviderTest(Params params) {
        return demoProviderClient.springQueryMapProviderTest(params);
    }

    @Override
    public Result complexObjectProviderTest(ComplexObject object) {
        return demoProviderClient.complexObjectProviderTest(object);
    }

    @Override
    public Result complexObjectProviderTest(ComplexObject object, Params params) {
        return demoProviderClient.complexObjectProviderTest(object);
    }


}
